package bpm.dao.impl.document;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bpm.domain.document.Operation;

/**
 * 
 * @author <a mailto="hwangsyin@gmail.com">King</a>
 *
 */
public class OperationMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		Operation operation = new Operation();
		
		operation.setId(rs.getInt("id"));
		operation.setKey(rs.getString("key"));
		operation.setName(rs.getString("name"));
		operation.setGroup(rs.getString("group"));
		operation.setRank(rs.getInt("rank"));
		operation.setRoles(rs.getString("role"));
		operation.setDescription(rs.getString("description"));
		
		return operation;
	}

}
